POV-Ray : Newsgroups : povray.programming : Number_Of_Waves Bug in POV-Ray : Number_Of_Waves Bug in POV-Ray Server Time
28 Jul 2024 18:21:16 EDT (-0400)
  Number_Of_Waves Bug in POV-Ray  
From: Mark Wagner
Date: 6 Oct 1999 00:25:14
Message: <37facf2a@news.povray.org>
While looking through the POV-Ray source code, I found a bug in the code for
the "ripples" and "waves" patterns.  As part of the startup sequence, the
function Initialize_Noise() is called.  This function sets up the hash table
for Noise and DNoise, the sine table for the cycloidal modifier, and the
wave source and frequency tables for the "waves" and "ripples" patterns.
However, it is called only once, during setup for rendering.  Consequently,
the result of increasing the setting for "number_of_waves" in a scene file
to a number greater than the default of 10 (or for people using
non-command-line versions of POV, beyond the setting for the last rendered
scene) is undefined.  I'm working from the source code for v3.1e, but I
checked through the list of changes between 3.1 and 3.1g and didn't find any
mention of the bug being fixed.  To demonstrate this problem, render the
following scene twice using a non-command-line version of POV:

global_settings{number_of_waves 15}
plane{y,0 pigment{waves frequency 5}}
light_source{y*100, 1}
camera{location 1 look_at 0}

The resulting image will look significantly different the second time it is
rendered.  The setting of Number_Of_Waves is preserved between renders, but
the wave and frequency tables are regenerated with each separate trace.  The
first time the scene is rendered, the tables are generated with the default
10 wave sources, but the second time, the correct number of sources are used
for generating the tables.

Mark


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.